﻿using UnityEngine;

namespace Assets.Scripts
{
    /// <summary>
    /// 数据管理器.
    /// </summary>
    public class DataManager : MonoBehaviour
    {
        private static DataManager _instance;

        public static DataManager Instance
        {
            get { return _instance; }
        }

        private void Awake()
        {
            _instance = this;
        }

        [SerializeField]
        private float _racketMoveSpeed = 1.0f;
        /// <summary>
        /// 球拍移动的速度.
        /// </summary>
        public float RacketMoveSpeed
        {
            get { return _racketMoveSpeed; }
        }

        [SerializeField]
        private float _ballMoveSpeed = 1.0f;
        /// <summary>
        /// 球移动的速度.
        /// </summary>
        public float BallMoveSpeed
        {
            get { return _ballMoveSpeed; }
        }

        [SerializeField]
        private float _ballSpeedDelta = 0.1f;
        /// <summary>
        /// 球碰到球拍时增加的速度.
        /// </summary>
        public float BallSpeedDelta
        {
            get { return _ballSpeedDelta; }
        }
    }
}
